/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Controleur;

import java.util.Random;

/**
 *
 * @author Raphaël
 */
public class Corps {

    private static int RAND_NUM = 101;
    private int taille;
    private int poids;
    private int faim;
    private int soif;
    private int resistancePhysique;
    private int force;
    private int fitness;
    private int dureeVie;
    private int vieInitiale;

    public Corps() {
        Random rand = new Random();
        this.taille = rand.nextInt(RAND_NUM);
        this.poids = rand.nextInt(RAND_NUM);
        this.faim = rand.nextInt(RAND_NUM);
        this.soif = rand.nextInt(RAND_NUM);
        this.resistancePhysique = rand.nextInt(RAND_NUM);
        this.force = rand.nextInt(RAND_NUM);
        this.fitness = rand.nextInt(RAND_NUM);
        this.dureeVie = rand.nextInt(RAND_NUM) * rand.nextInt(RAND_NUM);
        this.vieInitiale = this.dureeVie;
    }

    public Corps(int taille, int poids, int faim, int soif, int resistancePhysique, int force, int fitness, int dureeVie) {
        this.taille = taille;
        this.poids = poids;
        this.faim = faim;
        this.soif = soif;
        this.resistancePhysique = resistancePhysique;
        this.force = force;
        this.fitness = fitness;
        this.dureeVie = dureeVie;
        this.vieInitiale = this.dureeVie;
    }

    public int getFaim() {
        return faim;
    }

    public int getFitness() {
        return fitness;
    }

    public int getForce() {
        return force;
    }

    public int getPoids() {
        return poids;
    }

    public int getResistancePhysique() {
        return resistancePhysique;
    }

    public int getSoif() {
        return soif;
    }

    public int getTaille() {
        return taille;
    }

    public void setDureeVie(int dureeVie) {
        this.dureeVie = dureeVie;
    }

    public int getDureeVie() {
        return dureeVie;
    }

    public int getVieInitiale() {
        return vieInitiale;
    }

    public void setVieInitiale(int vieInitiale) {
        this.vieInitiale = vieInitiale;
    }

    public void setFaim(int faim) {
        this.faim = faim;
    }

    public void setFitness(int fitness) {
        this.fitness = fitness;
    }

    public void setForce(int force) {
        this.force = force;
    }

    public void setPoids(int poids) {
        this.poids = poids;
    }

    public void setResistancePhysique(int resistancePhysique) {
        this.resistancePhysique = resistancePhysique;
    }

    public void setSoif(int soif) {
        this.soif = soif;
    }

    public void setTaille(int taille) {
        this.taille = taille;
    }

    public void villirCorps() {
        dureeVie = (dureeVie > 0) ? --dureeVie : 0;
    }

    public void afficheToutCorps() {
        System.out.println("Faim : " + getFaim());
        System.out.println("Fitness : " + getFitness());
        System.out.println("Force : " + getForce());
        System.out.println("Poids : " + getPoids());
        System.out.println("Resistance physique : " + getResistancePhysique());
        System.out.println("Soif : " + getSoif());
        System.out.println("Taille : " + getTaille());
    }
}
